package com.pti.usermanager.service.api;

import com.github.pagehelper.PageInfo;
import com.pti.usermanager.dao.po.DeptPo;
import com.pti.usermanager.web.dto.request.SaveDeptRequest;
import com.pti.usermanager.web.dto.request.SavePostByDidAndPid;
import com.pti.usermanager.web.dto.request.SaveUserByDidAndUid;
import com.pti.usermanager.web.dto.request.UpdateDeptRequest;
import com.pti.usermanager.web.dto.response.ResultResponse;

import java.util.List;

/**
 * @ClassName: DeptService
 * @Author: liumengyao
 * @Description: 部门业务层
 * @Date: 2019/1/17
 */
public interface DeptService {

    /**分页模糊查询部门*/
    PageInfo<DeptPo> findAll(String deptNm, Integer page, Integer pageSize);
    /**查看所有信息*/
    ResultResponse findAllCanCheck(String deptNm);
    /**根据deptId查看*/
    ResultResponse findDeptByDeptId(Long deptId);
    /**保存部门*/
    ResultResponse saveDept(SaveDeptRequest saveDeptRequest);
    /**修改部门*/
    ResultResponse updateDept(UpdateDeptRequest updateDeptRequest);
    /**删除部门*/
    ResultResponse delDept(Long deptId);
    /**分配岗位*/
    ResultResponse savePostByDeptIdAndPostId(SavePostByDidAndPid savePostByDidAndPid);
    /**分配用户*/
    ResultResponse saveUserByDeptIdAndUsrId(SaveUserByDidAndUid saveUserByDidAndUid);
    /**部门树查询*/
    List<DeptPo> findTree(Long compId);
}
